Closed Bug 1759846 Opened 3 years ago Closed 3 years ago

ClearKeyUtils.cpp: the 'empty' method should be used to check for emptiness instead of 'size'

Categories

(Developer Infrastructure :: Source Code Analysis, task)

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: Sylvestre, Assigned: tvaleev, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++])

Attachments

(1 file)

Filling as a good first bug to learn workflows.

aKeyIDs.size()
should use .empty() instead

https://searchfox.org/mozilla-central/rev/fa69d8b248e6c1df670aa6b019e30ec37e6672be/media/gmp-clearkey/0.1/ClearKeyUtils.cpp#265

As the change is trivial, it is just to learn how to contribute to Firefox.

Found by http://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html

Tutorials to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

In ClearKeyUtils.cpp: the 'empty' method should be used to check
for emptiness instead of 'size'

Assignee: nobody → tvaleev
Status: NEW → ASSIGNED

Just to remember how to contribute to Mozilla :)

Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/caf28310076d the 'empty' method should be used to check for emptiness. r=sylvestre

@Sylvestre could you please recommend some new bug to continue?:)

Flags: needinfo?(sledru)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch

Timur, interested to run:
https://bugzilla.mozilla.org/show_bug.cgi?id=1617532
on the whole tree?

Flags: needinfo?(sledru)

Yes. Going to take care about it.

Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: